package com.quanyan.place.mapper;

import com.quanyan.place.entity.TbBizPlace;
import com.quanyan.place.entity.TbBizPlaceBuyContractDetail;
import com.quanyan.place.entity.apireq.ReqPlaceContractInfoVo;
import com.quanyan.place.entity.apiresp.RespPlaceContractInfoVo;
import com.quanyan.place.entity.apiresp.RespRecommendPlaceOrder;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

/**
 * Created by Kingson.chan on 2016/6/27 0027.
 */
public interface PlaceMapper {
    /**
     * 更新场馆评论数或者报名数
     * @param map
     * @return
     */
    int updateCount(@Param("map")Map<String,Object> map);

    int updateSeaArea(TbBizPlace tbBizPlace);

    int getPrivateSeaByBusinessRep(Integer uid);

    List<TbBizPlaceBuyContractDetail> getPlaceMaxTime(TbBizPlaceBuyContractDetail vo);

    List<TbBizPlace> getPlaceList(@Param("map")Map<String,Object> map);

    List<RespPlaceContractInfoVo> getPlaceContractList(ReqPlaceContractInfoVo vo);

    int getPlaceContractListCount(ReqPlaceContractInfoVo vo);

    List<TbBizPlaceBuyContractDetail> getContractDetailByContractId(ReqPlaceContractInfoVo vo);

    List<TbBizPlaceBuyContractDetail> getPlaceIdAndUnitIdByContractId(ReqPlaceContractInfoVo vo);

    List<TbBizPlaceBuyContractDetail> getContractIdAndFinishDateList();

    List<TbBizPlace> getPlaceBycityCategory(Map<String, Integer> map);

    List<RespPlaceContractInfoVo> getContractListByPlaceId(ReqPlaceContractInfoVo vo);

    /**
     * 获取用户有当天即将开始的场地订单（当前时间与订单开始时间2小时以内）
     * @param uid
     * @return
     */
    List<RespRecommendPlaceOrder> orderPlaceByUid(Integer uid);
    /**
     * 获取用户有当天即将开始的场地订单（当前时间与订单开始时间24小时以内）
     * @param uid
     * @return
     */
    List<RespRecommendPlaceOrder> orderPlaceByUid24(Integer uid);
}
